package com.qf.smsplatform.webmaster.controller;

import com.qf.smsplatform.webmaster.dto.R;
import com.qf.smsplatform.webmaster.pojo.TDirtyword;
import com.qf.smsplatform.webmaster.service.DirtywordService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/dirty")
public class DirtywordController {

    @Autowired
    private DirtywordService dirtywordService;


    @GetMapping("/dirty/{id}")
    public R findDirtyById(@PathVariable Long id){
        TDirtyword dirtyById = dirtywordService.findDirtyById(id);
        return R.setOk(dirtyById);

    }
}
